package com.ruoyi.ufox.service.impl;



import com.ruoyi.ufox.domain.BisDeviceData;
import com.ruoyi.ufox.mapper.BisDeviceDataMapper;
import com.ruoyi.ufox.service.IBisDeviceDataService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;


/**
 * 蔬菜机传感器数据Service业务层处理
 * 
 * @author ufoxs
 * @date 2022-08-16
 */
@Service
public class BisDeviceDataServiceImpl implements IBisDeviceDataService
{
    @Autowired
    private BisDeviceDataMapper bisDeviceDataMapper;

    /**
     * 查询蔬菜机传感器数据
     * 
     * @param dataId 蔬菜机传感器数据主键
     * @return 蔬菜机传感器数据
     */
    @Override
    public BisDeviceData selectBisDeviceDataByDataId(Long dataId)
    {
        return bisDeviceDataMapper.selectBisDeviceDataByDataId(dataId);
    }

    /**
     * 查询蔬菜机传感器数据列表
     * 
     * @param bisDeviceData 蔬菜机传感器数据
     * @return 蔬菜机传感器数据
     */
    @Override
    public List<BisDeviceData> selectBisDeviceDataList(BisDeviceData bisDeviceData)
    {
        return bisDeviceDataMapper.selectBisDeviceDataList(bisDeviceData);
    }

    /**
     * 新增蔬菜机传感器数据
     * 
     * @param bisDeviceData 蔬菜机传感器数据
     * @return 结果
     */
    @Override
    public int insertBisDeviceData(BisDeviceData bisDeviceData)
    {
        return bisDeviceDataMapper.insertBisDeviceData(bisDeviceData);
    }

    /**
     * 修改蔬菜机传感器数据
     * 
     * @param bisDeviceData 蔬菜机传感器数据
     * @return 结果
     */
    @Override
    public int updateBisDeviceData(BisDeviceData bisDeviceData)
    {
        return bisDeviceDataMapper.updateBisDeviceData(bisDeviceData);
    }

    /**
     * 批量删除蔬菜机传感器数据
     * 
     * @param dataIds 需要删除的蔬菜机传感器数据主键
     * @return 结果
     */
    @Override
    public int deleteBisDeviceDataByDataIds(Long[] dataIds)
    {
        return bisDeviceDataMapper.deleteBisDeviceDataByDataIds(dataIds);
    }

    /**
     * 删除蔬菜机传感器数据信息
     * 
     * @param dataId 蔬菜机传感器数据主键
     * @return 结果
     */
    @Override
    public int deleteBisDeviceDataByDataId(Long dataId)
    {
        return bisDeviceDataMapper.deleteBisDeviceDataByDataId(dataId);
    }
/**
 * 插入当前小时数据
 */

    @Override
    public void insertBisDevice() {
        this.bisDeviceDataMapper.insertBisDevice();
    }
}
